package net.oschina.demo.domain;

import io.bloom.search.Searchable;
import org.apache.lucene.document.Document;

import java.util.List;
import java.util.Map;


/**
 * 测试索引的对象
 *
 * @author Winter Lau
 */
public class Post implements Searchable {

    private long id;
    private String title;
    private String body;

    public Post() {
    }

    public Post(long id, String t, String b) {
        this.id = id;
        this.title = t;
        this.body = b;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public long getId() {
        return id;
    }

    @Override
    public int compareTo(Searchable o) {
        return 0;
    }

    @Override
    public long id() {
        return id;
    }

    @Override
    public void setId(long id) {
        this.id = id;
    }

    @Override
    public Map<String, String> storeDocument() {
        return null;
    }

    @Override
    public Map<String, String> indexDocument() {
        return null;
    }

    @Override
    public List<? extends Searchable> listAfter(long id, int count) {
        return null;
    }

    @Override
    public Post fromDocument(Document document) {
        return null;
    }

    @Override
    public Document toDocument() {
        return null;
    }

    @Override
    public float boost() {
        return 1.0f;
    }



}
